﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Speech.Synthesis;
using System.Media;

namespace Gw2ApiTestApp
{
    class TtsTest
    {
        static void Main(string[] args)
        {
            //beep();
            speech();
        }

        public static void speech()
        {
            SpeechSynthesizer synth = new SpeechSynthesizer();
            synth.Rate = 1;
            PromptBuilder pb = new PromptBuilder();

            foreach (InstalledVoice voice in synth.GetInstalledVoices())
            {
                VoiceInfo info = voice.VoiceInfo;
                Console.WriteLine(info.Id);

                pb.StartVoice(info);
                pb.AppendText("Red has taken Stargrove!");
                pb.EndVoice();
                synth.SpeakAsync(pb);
                pb.ClearContent();
            }
            Console.ReadLine();

            synth.Dispose();
        }

        public static void beep()
        {
            Console.Beep(600, 500);
            SystemSounds.Asterisk.Play();

        }
    }
}
